<table>
  <tbody>
    <tr>
      <th>Id:</th>
      <td><?php echo $question->getId() ?></td>
    </tr>
    <tr>
      <th>Title:</th>
      <td><?php echo $question->getTitle() ?></td>
    </tr>
    <tr>
      <th>Body:</th>
      <td><?php echo $question->getBody() ?></td>
    </tr>
  </tbody>
</table>

<hr />

<a href="<?php echo url_for('question/edit?id='.$question->getId()) ?>">Edit</a>
&nbsp;
<a href="<?php echo url_for('question/index') ?>">List</a>

<?php use_helper('Text', 'Date') ?>
 
<hr />
<?php if ($answer) : ?>
    <?php foreach ($answer as $ans): ?>
    <form method="post" action="/frontend_dev.php/result/create">
    <p>-> <?php echo $ans->getBody() ?></p> 
    
    <input id="result_question_id" type="hidden" name="result[question_id]" value="<?php echo $question->getId() ?>">
    <input id="result_answer_id" type="hidden" name="result[answer_id]" value="<?php echo $ans->getId()?>">
    <input id="result_user_id" type="hidden" name="result[user_id]" value="1">
    <input id="result_point" type="hidden" name="result[point]" value="<?php echo $ans->getPoint()?>">
    <input id="result_check" type="hidden" name="result[check]" value="<?php echo $ans->getCheck()?>">
	<input id="result_id" type="hidden" name="result[id]">
	<input id="result__csrf_token" type="hidden" value="ab6937b0e9a47953282992ea11448d7a" name="result[_csrf_token]">
    <input type="submit" value="Save">   
    </form>
  <?php endforeach; ?>
<?php endif; ?>
